Integrand size = 21, antiderivative size = 161 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {a \log (1-\sin (c+d x))}{2 (a+b)^3 d}+\frac {a \log (1+\sin (c+d x))}{2 (a-b)^3 d}-\frac {a^2 \left (a^2+3 b^2\right ) \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {a^3}{\left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}+\frac {\sec ^2(c+d x) \left (a^2+b^2-2 a b \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^2 d} \]
1/2*a*ln(1-sin(d*x+c))/(a+b)^3/d+1/2*a*ln(1+sin(d*x+c))/(a-b)^3/d-a^2*(a^2 +3*b^2)*ln(a+b*sin(d*x+c))/(a^2-b^2)^3/d+a^3/(a^2-b^2)^2/d/(a+b*sin(d*x+c) )+1/2*sec(d*x+c)^2*(a^2+b^2-2*a*b*sin(d*x+c))/(a^2-b^2)^2/d
Time = 0.50 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.90 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {2 a \log (1-\sin (c+d x))}{(a+b)^3}+\frac {2 a \log (1+\sin (c+d x))}{(a-b)^3}-\frac {4 a^2 \left (a^2+3 b^2\right ) \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3}-\frac {1}{(a+b)^2 (-1+\sin (c+d x))}+\frac {1}{(a-b)^2 (1+\sin (c+d x))}+\frac {4 a^3}{\left (a^2-b^2\right )^2 (a+b \sin (c+d x))}}{4 d} \]
((2*a*Log[1 - Sin[c + d*x]])/(a + b)^3 + (2*a*Log[1 + Sin[c + d*x]])/(a - b)^3 - (4*a^2*(a^2 + 3*b^2)*Log[a + b*Sin[c + d*x]])/(a^2 - b^2)^3 - 1/((a + b)^2*(-1 + Sin[c + d*x])) + 1/((a - b)^2*(1 + Sin[c + d*x])) + (4*a^3)/ ((a^2 - b^2)^2*(a + b*Sin[c + d*x])))/(4*d)
Time = 0.55 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.14, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 3200, 601, 27, 2160, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^3}{(a+b \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle \frac {\int \frac {b^3 \sin ^3(c+d x)}{(a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 601 |
\(\displaystyle \frac {\frac {b^2 \left (a^2-2 a b \sin (c+d x)+b^2\right )}{2 \left (a^2-b^2\right )^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int -\frac {2 \left (-\frac {a \sin ^2(c+d x) b^6}{\left (a^2-b^2\right )^2}+\frac {a^3 b^4}{\left (a^2-b^2\right )^2}-\frac {a^2 \sin (c+d x) b^3}{a^2-b^2}\right )}{(a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{2 b^2}}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\int \frac {-\frac {a \sin ^2(c+d x) b^6}{\left (a^2-b^2\right )^2}+\frac {a^3 b^4}{\left (a^2-b^2\right )^2}-\frac {a^2 \sin (c+d x) b^3}{a^2-b^2}}{(a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{b^2}+\frac {b^2 \left (a^2-2 a b \sin (c+d x)+b^2\right )}{2 \left (a^2-b^2\right )^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 2160 |
\(\displaystyle \frac {\frac {\int \left (-\frac {b^2 a^3}{(a-b)^2 (a+b)^2 (a+b \sin (c+d x))^2}-\frac {b^2 \left (a^2+3 b^2\right ) a^2}{(a-b)^3 (a+b)^3 (a+b \sin (c+d x))}-\frac {b^2 a}{2 (a+b)^3 (b-b \sin (c+d x))}+\frac {b^2 a}{2 (a-b)^3 (\sin (c+d x) b+b)}\right )d(b \sin (c+d x))}{b^2}+\frac {b^2 \left (a^2-2 a b \sin (c+d x)+b^2\right )}{2 \left (a^2-b^2\right )^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {b^2 \left (a^2-2 a b \sin (c+d x)+b^2\right )}{2 \left (a^2-b^2\right )^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}+\frac {-\frac {a^2 b^2 \left (a^2+3 b^2\right ) \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3}+\frac {a^3 b^2}{\left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac {a b^2 \log (b-b \sin (c+d x))}{2 (a+b)^3}+\frac {a b^2 \log (b \sin (c+d x)+b)}{2 (a-b)^3}}{b^2}}{d}\) |
((b^2*(a^2 + b^2 - 2*a*b*Sin[c + d*x]))/(2*(a^2 - b^2)^2*(b^2 - b^2*Sin[c + d*x]^2)) + ((a*b^2*Log[b - b*Sin[c + d*x]])/(2*(a + b)^3) - (a^2*b^2*(a^ 2 + 3*b^2)*Log[a + b*Sin[c + d*x]])/(a^2 - b^2)^3 + (a*b^2*Log[b + b*Sin[c + d*x]])/(2*(a - b)^3) + (a^3*b^2)/((a^2 - b^2)^2*(a + b*Sin[c + d*x])))/ b^2)/d
3.2.82.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo l] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Coe ff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Pol ynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x) *((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[(c + d*x)^n*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*(p + 1)*Qx)/(c + d*x)^n + (e* (2*p + 3))/(c + d*x)^n, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 1] && LtQ[p, -1] && ILtQ[n, 0] && NeQ[b*c^2 + a*d^2, 0]
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 1.28 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.89
method | result | size |
derivativedivides | \(\frac {\frac {1}{4 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {a \ln \left (1+\sin \left (d x +c \right )\right )}{2 \left (a -b \right )^{3}}-\frac {1}{4 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {a \ln \left (\sin \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}+\frac {a^{3}}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \sin \left (d x +c \right )\right )}-\frac {a^{2} \left (a^{2}+3 b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a -b \right )^{3} \left (a +b \right )^{3}}}{d}\) | \(143\) |
default | \(\frac {\frac {1}{4 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {a \ln \left (1+\sin \left (d x +c \right )\right )}{2 \left (a -b \right )^{3}}-\frac {1}{4 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {a \ln \left (\sin \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}+\frac {a^{3}}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \sin \left (d x +c \right )\right )}-\frac {a^{2} \left (a^{2}+3 b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a -b \right )^{3} \left (a +b \right )^{3}}}{d}\) | \(143\) |
risch | \(-\frac {i a x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}-\frac {i a c}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {i a x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {i a c}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 i a^{4} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}+\frac {2 i a^{4} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}+\frac {6 i a^{2} b^{2} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}+\frac {6 i a^{2} b^{2} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}+\frac {2 i \left (i a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-i b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+{\mathrm e}^{5 i \left (d x +c \right )} a \,b^{2}-i a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+i b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+4 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}+b^{2} a \,{\mathrm e}^{i \left (d x +c \right )}+a^{3} {\mathrm e}^{5 i \left (d x +c \right )}+a^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{\left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{2} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right ) d \left (a^{2}-b^{2}\right )^{2}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {a \ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {3 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) b^{2}}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(664\) |
1/d*(1/4/(a-b)^2/(1+sin(d*x+c))+1/2*a/(a-b)^3*ln(1+sin(d*x+c))-1/4/(a+b)^2 /(sin(d*x+c)-1)+1/2*a/(a+b)^3*ln(sin(d*x+c)-1)+a^3/(a+b)^2/(a-b)^2/(a+b*si n(d*x+c))-a^2*(a^2+3*b^2)/(a-b)^3/(a+b)^3*ln(a+b*sin(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 388 vs. \(2 (159) = 318\).
Time = 0.35 (sec) , antiderivative size = 388, normalized size of antiderivative = 2.41 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {a^{5} - 2 \, a^{3} b^{2} + a b^{4} + 2 \, {\left (a^{5} - a b^{4}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left ({\left (a^{4} b + 3 \, a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} + 3 \, a^{3} b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + {\left ({\left (a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d \cos \left (d x + c\right )^{2}\right )}} \]
1/2*(a^5 - 2*a^3*b^2 + a*b^4 + 2*(a^5 - a*b^4)*cos(d*x + c)^2 - 2*((a^4*b + 3*a^2*b^3)*cos(d*x + c)^2*sin(d*x + c) + (a^5 + 3*a^3*b^2)*cos(d*x + c)^ 2)*log(b*sin(d*x + c) + a) + ((a^4*b + 3*a^3*b^2 + 3*a^2*b^3 + a*b^4)*cos( d*x + c)^2*sin(d*x + c) + (a^5 + 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*cos(d*x + c)^2)*log(sin(d*x + c) + 1) + ((a^4*b - 3*a^3*b^2 + 3*a^2*b^3 - a*b^4)*cos (d*x + c)^2*sin(d*x + c) + (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*cos(d*x + c)^2)*log(-sin(d*x + c) + 1) - (a^4*b - 2*a^2*b^3 + b^5)*sin(d*x + c))/(( a^6*b - 3*a^4*b^3 + 3*a^2*b^5 - b^7)*d*cos(d*x + c)^2*sin(d*x + c) + (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*d*cos(d*x + c)^2)
\[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int \frac {\tan ^{3}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \]
Time = 0.21 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.70 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {\frac {2 \, {\left (a^{4} + 3 \, a^{2} b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} - \frac {a \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {a \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {3 \, a^{3} + a b^{2} - 2 \, {\left (a^{3} + a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (a^{2} b - b^{3}\right )} \sin \left (d x + c\right )}{a^{5} - 2 \, a^{3} b^{2} + a b^{4} - {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )^{3} - {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )^{2} + {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )}}{2 \, d} \]
-1/2*(2*(a^4 + 3*a^2*b^2)*log(b*sin(d*x + c) + a)/(a^6 - 3*a^4*b^2 + 3*a^2 *b^4 - b^6) - a*log(sin(d*x + c) + 1)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - a* log(sin(d*x + c) - 1)/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) - (3*a^3 + a*b^2 - 2 *(a^3 + a*b^2)*sin(d*x + c)^2 - (a^2*b - b^3)*sin(d*x + c))/(a^5 - 2*a^3*b ^2 + a*b^4 - (a^4*b - 2*a^2*b^3 + b^5)*sin(d*x + c)^3 - (a^5 - 2*a^3*b^2 + a*b^4)*sin(d*x + c)^2 + (a^4*b - 2*a^2*b^3 + b^5)*sin(d*x + c)))/d
Time = 0.66 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.54 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {\frac {2 \, {\left (a^{4} b + 3 \, a^{2} b^{3}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, a^{3} \sin \left (d x + c\right )^{2} + 2 \, a b^{2} \sin \left (d x + c\right )^{2} + a^{2} b \sin \left (d x + c\right ) - b^{3} \sin \left (d x + c\right ) - 3 \, a^{3} - a b^{2}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (b \sin \left (d x + c\right )^{3} + a \sin \left (d x + c\right )^{2} - b \sin \left (d x + c\right ) - a\right )}}}{2 \, d} \]
-1/2*(2*(a^4*b + 3*a^2*b^3)*log(abs(b*sin(d*x + c) + a))/(a^6*b - 3*a^4*b^ 3 + 3*a^2*b^5 - b^7) - a*log(abs(sin(d*x + c) + 1))/(a^3 - 3*a^2*b + 3*a*b ^2 - b^3) - a*log(abs(sin(d*x + c) - 1))/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) - (2*a^3*sin(d*x + c)^2 + 2*a*b^2*sin(d*x + c)^2 + a^2*b*sin(d*x + c) - b^3 *sin(d*x + c) - 3*a^3 - a*b^2)/((a^4 - 2*a^2*b^2 + b^4)*(b*sin(d*x + c)^3 + a*sin(d*x + c)^2 - b*sin(d*x + c) - a)))/d
Time = 7.04 (sec) , antiderivative size = 351, normalized size of antiderivative = 2.18 \[ \int \frac {\tan ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^2-b^2}+\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{a^2-b^2}+\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (a^2+b^2\right )}{{\left (a^2-b^2\right )}^2}-\frac {4\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{a^4-2\,a^2\,b^2+b^4}-\frac {4\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{{\left (a^2-b^2\right )}^2}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{d\,{\left (a-b\right )}^3}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^4+3\,a^2\,b^2\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{d\,{\left (a+b\right )}^3} \]
((2*a*tan(c/2 + (d*x)/2)^2)/(a^2 - b^2) + (2*a*tan(c/2 + (d*x)/2)^4)/(a^2 - b^2) + (4*b*tan(c/2 + (d*x)/2)^3*(a^2 + b^2))/(a^2 - b^2)^2 - (4*a^2*b*t an(c/2 + (d*x)/2)^5)/(a^4 + b^4 - 2*a^2*b^2) - (4*a^2*b*tan(c/2 + (d*x)/2) )/(a^2 - b^2)^2)/(d*(a + 2*b*tan(c/2 + (d*x)/2) - a*tan(c/2 + (d*x)/2)^2 - a*tan(c/2 + (d*x)/2)^4 + a*tan(c/2 + (d*x)/2)^6 - 4*b*tan(c/2 + (d*x)/2)^ 3 + 2*b*tan(c/2 + (d*x)/2)^5)) + (a*log(tan(c/2 + (d*x)/2) + 1))/(d*(a - b )^3) - (log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)*(a^4 + 3* a^2*b^2))/(d*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)) + (a*log(tan(c/2 + (d*x) /2) - 1))/(d*(a + b)^3)